Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip-ci] machine images #21335

Closed
wants to merge 1 commit into from
Closed

Conversation

lsm5
Copy link
Member

@lsm5 lsm5 commented Jan 23, 2024

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Jan 23, 2024
Copy link
Contributor

openshift-ci bot commented Jan 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lsm5

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note-none and removed do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Jan 23, 2024
@cevich
Copy link
Member

cevich commented Jan 24, 2024

Lokesh, since you're touching secrets here the secret scanner is going to continue barfing. When this gets closer to being ready to merge, you'll need to open a separate PR to add the findings to the baseline (it's documented in the .gitleaks README.md). Poke me if you need help.

@lsm5 lsm5 force-pushed the podman-next-machine-images branch 4 times, most recently from 61dcfd9 to 496a090 Compare February 7, 2024 15:40
@lsm5 lsm5 changed the title machine images [skip-ci] machine images Feb 7, 2024
@lsm5 lsm5 force-pushed the podman-next-machine-images branch 7 times, most recently from 35242da to f648c76 Compare February 8, 2024 12:54
@lsm5
Copy link
Member Author

lsm5 commented Feb 8, 2024

Ignore all packit notifications above.

@lsm5 lsm5 force-pushed the podman-next-machine-images branch 10 times, most recently from 2a6fa53 to 7f51fab Compare February 9, 2024 15:20
@containers containers deleted a comment from packit-as-a-service bot Feb 12, 2024
@containers containers deleted a comment from packit-as-a-service bot Feb 12, 2024
@containers containers deleted a comment from packit-as-a-service bot Feb 12, 2024
@lsm5 lsm5 force-pushed the podman-next-machine-images branch 13 times, most recently from 5155b94 to 8e69a7c Compare February 14, 2024 15:40
@@ -32,6 +33,10 @@ jobs:
run: |
pip3 install git+https://github.com/packit/wait-for-copr.git@main

- name: Set up cosa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need cosa for this.

So here's how I think this would go roughly:

  • Based on some trigger (e.g. polling new RPMs out of COPR, or there's a new quay.io/fedora/fedora-coreos:stable image published), start this job
  • Do a podman build of an image that does FROM: quay.io/fedora/fedora-coreos:stable, and e.g. removes moby, adds the podman RPMs, adds subscription manager, etc...
  • Run osbuild to convert the container image into disk images using the same manifests we use (these are currently hosted e.g. here and here, but I think the goal is to move them out). This requires running on a system with full root privileges. For aarch64, GHA was planning to add runners but it's not clear if that has happened yet. Alternatively, you can have a self-hosted runner on e.g. AWS. Nested virt shouldn't be required AIUI since osbuild uses loopbacks instead.
  • Bundle up the disk images into container images and push to the registry

For the triggering, probably the simplest is polling and comparing the latest versions of the RPMs and base FCOS image against the latest pushed podman machine images (e.g. you can store the versioning in labels).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@dustymabe dustymabe Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so basically step 3 turns into "run this script" in an environment that can run OSBuild (i.e. run as root, selinux permissive, some osbuild RPMs installed).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need cosa for this.

Ack

  • Based on some trigger (e.g. polling new RPMs out of COPR, or there's a new quay.io/fedora/fedora-coreos:stable image published), start this job
  • Do a podman build of an image that does FROM: quay.io/fedora/fedora-coreos:stable, and e.g. removes moby, adds the podman RPMs, adds subscription manager, etc...

These two steps are pretty much happening already using https://github.com/containers/podman/blob/main/contrib/podman-next/fcos-podmanimage/Containerfile . This was taken from https://github.com/coreos/layering-examples/tree/main/podman-next .

subscription-manager addition isn't being done yet, I'll defer to @baude on that.

The container images built are pushed to https://quay.io/repository/podman/fcos?tab=tags .

  • Run osbuild to convert the container image into disk images using the same manifests we use (these are currently hosted e.g. here and here, but I think the goal is to move them out). This requires running on a system with full root privileges. For aarch64, GHA was planning to add runners but it's not clear if that has happened yet. Alternatively, you can have a self-hosted runner on e.g. AWS. Nested virt shouldn't be required AIUI since osbuild uses loopbacks instead.
  • Bundle up the disk images into container images and push to the registry

Ack, thanks. I'll look into these two.

For the triggering, probably the simplest is polling and comparing the latest versions of the RPMs and base FCOS image against the latest pushed podman machine images (e.g. you can store the versioning in labels).

Ack. The trigger for the existing action right now is a commit to the main branch of podman followed by a successful rpm build at the podman-next COPR. This is done using https://github.com/packit/wait-for-copr.git . So far, we haven't been checking for image updates at quay.io/fedora/fedora-coreos:stable though IIUC that's part of upcoming work.

@lsm5 lsm5 force-pushed the podman-next-machine-images branch 5 times, most recently from 107bd13 to f5742bb Compare February 28, 2024 13:10
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <[email protected]>
@lsm5
Copy link
Member Author

lsm5 commented Apr 3, 2024

obsoleted by coreos/fedora-coreos-pipeline#968 . Closing..

@lsm5 lsm5 closed this Apr 3, 2024
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jul 3, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants